Skip to content

Conversation

dheerajiiitv
Copy link

@dheerajiiitv dheerajiiitv commented Jun 23, 2023

Fix #61

CC: @hauntsaninja

@dheerajiiitv
Copy link
Author

@hauntsaninja please review

@rishabh-sagar-20
Copy link

Any update on this @hauntsaninja?

@AlexanderCollins
Copy link

@dheerajiiitv did you test this on aws lambda? I tried your changes in lambda with no success, same issue persists.

@dheerajiiitv
Copy link
Author

@AlexanderCollins I did not test it on AWS lambda. Can you check and debug the values in the filter list? And also how did you build the package with my changes?

@azmathr
Copy link

azmathr commented Feb 15, 2024

@dheerajiiitv I get error in lambda while deploying through zappa

  File "/var/task/summaryserver.py", line 13, in <module>
    encoding = tiktoken.get_encoding("cl100k_base")
  File "/var/task/tiktoken/registry.py", line 64, in get_encoding
    _find_constructors()
  File "/var/task/tiktoken/registry.py", line 44, in _find_constructors

@mpinta
Copy link

mpinta commented Feb 20, 2024

Hey! Although this is not a solution for tiktoken, you can work around this error by adding the following to your zappa_settings.json file:

"exclude": [
    "pycache",
    "__pycache__"
]

Successfully tested on AWS Lambda.

@azmathr
Copy link

azmathr commented Feb 21, 2024

Thanks but that gives this error: Runtime.ImportModuleError: Unable to import module 'handler': No module named 'werkzeug' and Runtime.ImportModuleError: Unable to import module 'handler': attempted relative import with no known parent package

@azmathr
Copy link

azmathr commented Feb 21, 2024

I deleted pycache file from seite packages main folder and tiktoken folders and it worked!

@rishabh-sagar-20
Copy link

Hey @hauntsaninja, is there any update on this? When are we merging this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to find ENCODING_CONSTRUCTORS
5 participants